package com.bbzn.device.client.service.impl;

import com.bbzn.device.client.dao.mqttsub.MqttSubMapper;
import com.bbzn.device.client.dataobject.MqttSub;
import com.bbzn.device.client.service.MqttSubService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class MqttSubServiceImpl implements MqttSubService {

    @Resource
    private MqttSubMapper mqttSubMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return mqttSubMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(MqttSub record) {
        return mqttSubMapper.insert(record);
    }

    @Override
    public int insertOrUpdate(MqttSub record) {
        return mqttSubMapper.insertOrUpdate(record);
    }

    @Override
    public int insertOrUpdateSelective(MqttSub record) {
        return mqttSubMapper.insertOrUpdateSelective(record);
    }

    @Override
    public int insertSelective(MqttSub record) {
        return mqttSubMapper.insertSelective(record);
    }

    @Override
    public MqttSub selectByPrimaryKey(Integer id) {
        return mqttSubMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(MqttSub record) {
        return mqttSubMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(MqttSub record) {
        return mqttSubMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<MqttSub> findByAll(MqttSub mqttSub) {
        return mqttSubMapper.findByAll(mqttSub);
    }

    @Override
    public int updateBatch(List<MqttSub> list) {
        return mqttSubMapper.updateBatch(list);
    }

    @Override
    public int updateBatchSelective(List<MqttSub> list) {
        return mqttSubMapper.updateBatchSelective(list);
    }

    @Override
    public int batchInsert(List<MqttSub> list) {
        return mqttSubMapper.batchInsert(list);
    }

    @Override
    public List<MqttSub> findListByGroupId(List<Long> ids) {
        return mqttSubMapper.findListByGroupId(ids);
    }

    @Override
    public List<MqttSub> findListByGid(List<Long> ids) {
        return mqttSubMapper.findListByGid(ids);
    }

    @Override
    public int deleteByGroupId(List<Long> ids) {
        return mqttSubMapper.deleteByGroupId(ids);
    }

    @Override
    public int batchDel(List<Integer> list) {
        return mqttSubMapper.batchDel(list);
    }

    @Override
    public int updateTopicByClientIdAndOldTopic(String oldTopic, String client, String updateTopic, Date updateTime, String updatedBy) {
        return mqttSubMapper.updateTopicByClientIdAndOldTopic(oldTopic,client,updateTopic,updateTime,updatedBy);
    }
}

